import { View } from "../../../../mvc/core/View";
import { GlobalClass } from "../../../../../com/mui/core/GlobalClass";
import { ImagesConst } from "../../../resource/ImagesConst";
import { EffectManager } from "../../../manager/EffectManager";
import { UIIconEvent } from "../../uiIconBtn/UIIconEvent";
import { Dispatcher } from "../../../../mvc/core/Dispatcher";
import { DataEvent } from "../../../events/DataEvent";
import { EventName } from "../../../mvc/EventName";
//class AcupointHintIcon
    
    export  class AcupointHintIcon extends View
    {
        constructor()
        {
            super();
            this.init();
            return;
        }

        /* internal  */init(): void
        {
            this.hintIcon = new Object /* flash.display.Sprite */();
            this.hintIcon.buttonMode = true;
            this.hintIcon.addChild(GlobalClass.getBitmap(ImagesConst.Acupoint_HintIcon));
            addChild(this.hintIcon);
            this.hintIcon.addEventListener(flash.events.MouseEvent.CLICK, this.onHintIconClickHandler);
            return;
        }

        /* internal  */onHintIconClickHandler(arg1: Object /* flash.events.MouseEvent */): void
        {
            if (this.parent) 
            {
                this.parent.removeChild(this);
                EffectManager.glowFilterUnReg(this);
                this.dispatchEvent(new UIIconEvent(UIIconEvent.RemoveIcon));
            }
            this.hide();
            Dispatcher.dispatchEvent(new DataEvent(EventName.AcupointHintIconClick));
            return;
        }

        /* internal */ /* var */hintIcon: Object /* flash.display.Sprite */;
    }
